In-line dynamic text with variable formatting

ABSTRACT

Techniques for configuring a dynamic document template and for generating formatted documents based thereon are provided. A data source is associated with a dynamic document template. Static text is inserted into the template. One or more placeholders are inserted in the template. Expressions may be associated with static text and placeholders in the template. Each expression may reference one or more data elements of the data source. One or more formatted documents may be generated based on the dynamic document template. In the case of placeholders, a data element referenced by an expression associated with a placeholder may be displayed in a formatted document in place of the placeholder in a display format (e.g., a color, a font type, etc.) selected according to the expression. Likewise, a display format of static text may be selected based on an expression associated with the static text.

BACKGROUND

Electronic reports may include static text and dynamic text. Static textis text of an electronic report that does not change from one version ofthe electronic report to another version (e.g., “boilerplate”). Dynamictext is text of an electronic report that may change from one version ofthe electronic report to another version. In some cases, the dynamictext may be provided from a source outside of the electronic report,such as a database field, an expression, a web service, or anotherexternal source. Techniques are desired for defining strings of statictext that are interspersed with strings of dynamic text in electronicreports.

A “mail merge” tool is a type of tool that enables multiple versions ofa report to be generated from a base document that is a combination ofstatic text and dynamic data. Mail merge tools are typically used forcreating personalized letters, pre-addressed envelopes, and/or mailinglabels for mass mailings. Some examples of word processors that includemail merge capability include WordPerfect®, published by CorelCorporation of Ottawa, Canada, Microsoft® Word, published by MicrosoftCorporation of Redmond, Wash., and Lotus® Word Pro®, published by IBMCorporation of Armonk, N.Y.

Currently available mail merge tools, however, have undesirablelimitations. Examples of such limitations include a lack of control overthe appearance of the contents of various versions of a document,inflexibility in document formats, and difficulties in binding dynamictext with external sources of data.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

Techniques are provided for configuring a dynamic document template, andat runtime, generating formatted documents based thereon. Static textand dynamic text may be present in the dynamic document template, suchthat the static text is the same in each formatted document, while thedynamic text may vary between formatted documents. A user interface anda declarative language may be used to define the dynamic text in anoutput-format independent manner. Various display formats can be appliedto both the static text and the dynamic text that are selected atruntime using data and logic from any number of different sources.

For instance, in one implementation, a method for configuring a dynamicdocument is provided. A data source is enabled to be associated with adynamic document template. Static text is enabled to be inserted intothe dynamic document template. A placeholder is enabled to be insertedin the dynamic document template. An expression is enabled to beassociated with the placeholder in the dynamic document template. Theexpression references a data element of the data source to be displayedin place of the placeholder (at runtime). Furthermore, the expressionmay be configured to select a display attribute for the data element.

Furthermore, a second expression may be associated with a secondplaceholder inserted in the dynamic document template. The secondexpression references a second data element of the data source. Thesecond expression is configured to determine a data value to bedisplayed in place of the second placeholder based at least on thesecond data element.

Still further, a third expression may be associated with a portion ofthe static text. The third expression references a third data element ofthe data source. The third expression is configured to select a displayattribute for the portion of static text based at least on the thirddata element.

In another implementation, a method for generating a formatted documentis provided. A dynamic document template is received. A formatteddocument is generated based on the dynamic document template. Statictext is detected in the dynamic document template. One or moreplaceholders are detected in the dynamic document template. The detectedstatic text is included in the formatted document. A data element isretrieved from a data source associated with the dynamic documenttemplate. The data element is referenced by an expression associatedwith a detected placeholder in the dynamic document template. Theexpression is evaluated to select a display attribute. The data elementis included in the formatted document in place of the placeholder, andis configured for display according to the selected display attribute.

Furthermore, a second data element may be retrieved that is referencedby a second expression associated with a detected second placeholder inthe dynamic document template. The second expression is evaluated todetermine a data value. The data value is included in the formatteddocument in place of the detected second placeholder.

Still further, a third data element may be retrieved that is referencedby a third expression associated with a portion of the detected statictext in the dynamic document template. The third expression is evaluatedto select a second display attribute. The portion of static text isconfigured to be displayed according to the selected second displayattribute.

In another implementation, a document configurer is provided. Thedocument configurer includes a template editor. The template editorincludes a text editor module, a placeholder designator module, adisplay attribute module, and an expression editor module. The texteditor module is configured to enable text (e.g., static text) to beedited (e.g., added, deleted, modified) by a user in a dynamic documenttemplate. Placeholder designator module is configured to designate oneor more placeholders (e.g., dynamic text) in the dynamic documenttemplate. Display attribute module is configured to enable displayattributes for static text and/or dynamic text to be configured in thedynamic document template. Expression editor module is configured toenable a user to configure one or more expressions in the dynamicdocument template that are associated with the static text and/ordynamic text.

In still another implementation, a document generator is provided. Thedocument generator includes a document formatter. The document formatterincludes a static text recognizer, a placeholder recognizer, anexpression evaluator, and a text formatter. The document formatter isconfigured to receive a dynamic document template and to generate aformatted document. The static text recognizer is configured to detectstatic text in the dynamic document template. The placeholder recognizeris configured to detect one or more placeholders in the dynamic documenttemplate. The document formatter is configured to include the statictext in the formatted document, and to retrieve from a data sourceassociated with the dynamic document template a data element referencedby an expression associated with a detected placeholder in the dynamicdocument template. The expression evaluator is configured to evaluatethe expression to select a display attribute. The text formatter isconfigured to include the data element in the formatted document inplace of the placeholder. The data element is configured for displayaccording to the selected display attribute by the text formatter.

Computer systems and computer program products (stored on a computerreadable medium) are also described herein that are capable ofperforming and/or enabling the methods described above and elsewhereherein, including configuring a dynamic document template, generatingformatted documents based on a dynamic document template, and forimplementing further embodiments as described herein.

Further features and advantages of the invention, as well as thestructure and operation of various embodiments of the invention, aredescribed in detail below with reference to the accompanying drawings.It is noted that the invention is not limited to the specificembodiments described herein. Such embodiments are presented herein forillustrative purposes only. Additional embodiments will be apparent topersons skilled in the relevant art(s) based on the teachings containedherein.

BRIEF DESCRIPTION OF THE DRAWINGS/FIGURES

The accompanying drawings, which are incorporated herein and form a partof the specification, illustrate the present invention and, togetherwith the description, further serve to explain the principles of theinvention and to enable a person skilled in the pertinent art to makeand use the invention.

FIG. 1 shows a block diagram of a report generating system, according toan example embodiment.

FIG. 2 shows a block diagram of dynamic document template, according toan example embodiment.

FIG. 3 shows a block diagram of a report generating system, according toan example embodiment.

FIG. 4 shows a block diagram of a document configurer, according to anexample embodiment.

FIG. 5 shows a flowchart describing a process for configuring a dynamicdocument, according to an example embodiment.

FIG. 6 shows a block diagram of a template editor, according to anexample embodiment.

FIG. 7 shows a flowchart that may be performed to use a graphical userinterface (GUI) to associate an expression with a placeholder in adynamic document, according to an example embodiment.

FIG. 8 shows a GUI window for configuring display attributes for text ina dynamic document, according to an example embodiment.

FIG. 9 shows an expression entry window, according to an exampleembodiment.

FIG. 10 shows a process for associating an expression with a placeholderthat is configured to determine a data value to be displayed in place ofthe placeholder, according to an example embodiment.

FIG. 11 shows a process for associating an expression with static textthat is configured to select a display attribute for the static text,according to an example embodiment.

FIG. 12 shows a flowchart providing a process for generating formatteddocuments based on a dynamic document template, according to an exampleembodiment.

FIG. 13 shows a block diagram of a document generator, according to anexample embodiment.

FIG. 14 shows a flowchart describing a process for generating documents,according to an example embodiment.

FIG. 15 shows a portion of an example formatted document, according toan embodiment.

FIG. 16 shows a block diagram of a data source containing a database,according to an example embodiment.

FIG. 17 shows a flowchart providing a process for determining datavalues to be displayed in place of a placeholder, according to anexample embodiment.

FIG. 18 shows a flowchart providing a process for determining a displayattribute to be applied to static text in a formatted document,according to an example embodiment.

FIG. 19 shows a block diagram of an example computer system that may beused to implement embodiments of the present invention.

The features and advantages of the present invention will become moreapparent from the detailed description set forth below when taken inconjunction with the drawings, in which like reference charactersidentify corresponding elements throughout. In the drawings, likereference numbers generally indicate identical, functionally similar,and/or structurally similar elements. The drawing in which an elementfirst appears is indicated by the leftmost digit(s) in the correspondingreference number.

DETAILED DESCRIPTION I. Introduction

The present specification discloses one or more embodiments thatincorporate the features of the invention. The disclosed embodiment(s)merely exemplify the invention. The scope of the invention is notlimited to the disclosed embodiment(s). The invention is defined by theclaims appended hereto.

References in the specification to “one embodiment,” “an embodiment,”“an example embodiment,” etc., indicate that the embodiment describedmay include a particular feature, structure, or characteristic, butevery embodiment may not necessarily include the particular feature,structure, or characteristic. Moreover, such phrases are not necessarilyreferring to the same embodiment. Further, when a particular feature,structure, or characteristic is described in connection with anembodiment, it is submitted that it is within the knowledge of oneskilled in the art to implement such feature, structure, orcharacteristic in connection with other embodiments whether or notexplicitly described.

II. Example Embodiments

Embodiments of the present invention relate to techniques for generatingdocument templates, and for generating multiple versions of a dynamicdocument based on a document template. For instance, FIG. 1 shows ablock diagram of a report generating system 100, according to an exampleembodiment. System 100 is configured to enable generation of a documenttemplate representative of a dynamic document, and to enable multipleversions of the dynamic document to be generated based on the documenttemplate. As shown in FIG. 1, system 100 includes a document configurer102 and a document generator 106. Document configurer 102 is configuredto generate a dynamic document template 104. Document generator 106 mayreceive dynamic document template 104, and is configured to generate oneor more formatted documents 108 based on dynamic document template 104.Any number of formatted documents 108 may be generated, including tens,hundreds, thousands, and even greater numbers of formatted documents 108(three formatted documents 108 a-108 c are shown in FIG. 1, forillustrative purposes).

In embodiments, system 100 enables the display formatting of text informatted documents 108 to be dynamically variable. For example, in anembodiment, the display of text in formatted documents 108 may bevariable based on one or more expressions associated with the text indynamic document template 104.

For instance, FIG. 2 shows a block diagram of dynamic document template104, according to an example embodiment. As shown in FIG. 2, dynamicdocument template 104 may include a static text 202, a placeholder 204,a first expression 206, and a second expression 208. Static text 202 istext of dynamic document template 104 that does not change from oneversion to another version of formatted document 108 (e.g., is the samein formatted documents 108 a-108 c). Placeholder 204 is a placeholderfor dynamic text of dynamic document template 104 (text that may changefrom one version to another version of formatted document 108).Placeholder 204 may be positioned in-line with other text (e.g., statictext 202). In addition to indicating dynamic text, placeholder 204 mayindicate its binding characteristics. In an embodiment, placeholder 204may be entered into template 104 in a similar manner as static text 202(e.g., using text and a placeholder indicator, such as beginning andending bracket symbols) and may be configured to automatically bind toan appropriate data source (e.g., a default data source indicated fortemplate 104).

First expression 206 is associated with static text 202, and secondexpression 208 is associated with placeholder 204. First and secondexpressions 206 and 208 may each include any type of arithmetic and/orlogical expression, which may include one or more data values obtainedfrom a source external to dynamic document template 104. Firstexpression 206 may be evaluated to select a display attribute for statictext 202 in a particular formatted document 108. Second expression 208may be evaluated to determine a value to be displayed for placeholder204 in a particular formatted document 108, and/or to select a displayattribute for a value displayed for placeholder 204 in a particularformatted document 108. Example display attributes include one or moreof a font, a color, a bold setting, an italics setting, a font size, aline spacing, and/or an effects setting for displayed text in aformatted document 108.

In embodiments, more than one expression 206 may be associated withstatic text 202, and more than one expression 208 may be associated witha particular placeholder 204. For example, a first expression 206 may beconfigured to select a first display attribute (e.g., bold style) forstatic text 202, a second expression 206 may be configured to select asecond display attribute (e.g., font size) for static text 202, a thirdexpression 206 may be configured to select a third display attribute(e.g., color) for static text 202, etc. Likewise, with regard toplaceholder 204, a first expression 208 may be configured to determine avalue to be displayed in place of placeholder 204, a second expression208 may be configured to select a first display attribute (e.g., fonttype) for the value displayed for placeholder 204, a third expression208 may be configured to select a third display attribute (e.g.,effects) for the value displayed for placeholder 204, etc. For ease ofillustration, embodiments may be described below with regard to oneexpression associated with static text or a placeholder. However, it isto be understood that multiple expressions may also be associated withstatic text and placeholders.

System 100 of FIG. 1 may be implemented in various ways. For instance,document configurer 102 and document generator 106 may each beimplemented in hardware, software, firmware, or any combination thereof.For example, document configurer 102 and/or document generator 106 maybe implemented as computer program code configured to be executed in oneor more processors. Alternatively, document configurer 102 and/ordocument generator 106 may be implemented as hardware logic/electricalcircuitry.

For example, FIG. 3 shows a block diagram of a report generating system300, according to an example embodiment. System 300 is an example ofsystem 100 shown in FIG. 1. As shown in FIG. 3, system 300 includes afirst computer system 302, a storage 304, and a second computer system306. In the example of FIG. 3, first computer system 102 includes (e.g.,stores in memory or other storage, and/or executes) document configurer102, and second computer system 306 includes (e.g., stores in memory orother storage, and/or executes) document generator 106. Documentconfigurer 102 generates dynamic document template 104, which is storedin storage 304 by first computer system 304. Document generator 106retrieves dynamic document template 104 from storage 304, and generatesone or more formatted documents 108, which are stored by second computersystem 306 in storage 304.

The embodiment of FIG. 3 is provided for illustrative purposes, and isnot intended to be limiting. For instance, in another embodiment,document configurer 102 and document generator 106 may be included in asame computer system. Furthermore, formatted document 108 may be storedin separate storage from dynamic document template 104. First and secondcomputer systems 302 and 306 may each be any type of computer system,such as a stationary or mobile computing device, including a desktopcomputer (e.g., a personal computer), a mobile computer (e.g., apersonal digital assistant (PDA), a laptop computer, a notebookcomputer, a smart phone, etc.), or other type of computing device.Storage 304 may include one or more storage devices, including one ormore memory devices, hard disk drives, portable storage devices (e.g.,USB memory sticks), optical storage devices, etc.

The next subsection describes example embodiments for documentconfigurer 102, followed by a subsection that describes exampleembodiments for document generator 106.

A. Example Embodiments for Configuring a Dynamic Document

Example embodiments are described in this subsection for documentconfigurer 102 and for configuring dynamic documents. The exampleembodiments described herein are provided for illustrative purposes, andare not limiting. Furthermore, additional structural and operationalembodiments, including modifications/alterations, will become apparentto persons skilled in the relevant art(s) from the teachings herein.

Document configurer 102 may be configured in various ways to generatedynamic document template 104. For instance, FIG. 4 shows a blockdiagram of a document configurer 400, according to an exampleembodiment. Document configurer 400 is an example of document configurer102 shown in FIGS. 1 and 3. As shown in FIG. 4, document configurer 400includes a template editor 402, a template loader 404, and a data sourceselector 406. Document configurer 400 is described as follows.

Template loader 404 is optionally present. When present, template loader404 is configured to load a previously generated (e.g., partiallycompleted or fully completed) dynamic document template 104 intodocument configurer 400. For example, template loader 404 may provide anavigator interface that enables a user to enter a file name for apreviously stored dynamic document template 416, and/or to navigate to alocation at which previously stored dynamic document template 416 isstored, and to select the previously stored dynamic document template416 at the location to be loaded into document configurer 400. Templateloader 404 is further configured to provide the loaded, previouslystored dynamic document template 416 to template editor 402 for editing.

Template editor 402 is configured to generate dynamic document template104 anew (e.g., from no previous template file) or from a loaded dynamicdocument template (e.g., previously stored dynamic document 416). Asshown in FIG. 4, template editor 402 includes a text editor module 408,a placeholder designator module 410, a display attribute module 412, andan expression editor module 414. Text editor module 408 is configured toenable text (e.g., static text) to be edited (e.g., added, deleted,modified) by a user in dynamic document template 104. Placeholderdesignator module 410 is configured to designate one or moreplaceholders (e.g., dynamic text) in dynamic document template 104. Forexample, in an embodiment, placeholder designator module 410 may beconfigured to enable a user to enter one or more placeholders in dynamicdocument template 104. In another embodiment, placeholder designatormodule 410 may be configured to enable a user to select and convert textpreviously entered using text editor module 408 into a placeholder.Display attribute module 412 is configured to enable display attributesof static text and/or dynamic text to be configured in dynamic documenttemplate 104 by a user. Expression editor module 414 is configured toenable a user to configure one or more expressions in dynamic documenttemplate 104 that are associated with static text and/or dynamic text.

Data source selector 406 is configured to enable a user to select a datasource to be associated with dynamic document template 104. The datasource may be accessed to provide data that may be used to fillplaceholders and/or may be used by expressions in dynamic documenttemplate 104. As shown in FIG. 4, data source selector 406 provides adata source indication 418 which indicates a data source selected to beassociated with dynamic document template 104.

Document configurer 400 may operate in various ways. For example, FIG. 5shows a flowchart 500 describing a process for configuring a dynamicdocument, according to an example embodiment. For instance, documentconfigurers 102 and 400 may perform flowchart 500, in embodiments. Otherstructural and operational embodiments will be apparent to personsskilled in the relevant art(s) based on the discussion regardingflowchart 500. Flowchart 500 is described as follows.

As shown in FIG. 5, flowchart 500 begins with step 502. In step 502, adata source is enabled to be associated with a dynamic documenttemplate. For example, referring to FIG. 4, data source selector 406 maybe configured to enable a data source to be associated with dynamicdocument template 104. In an embodiment, data source selector 406 mayprovide an interface that enables a user to enter or navigate to a datasource name or location (e.g., a directory path and file name, a URI(uniform resource indicator), etc.). As shown in FIG. 4, data sourceselector 406 provides data source indication 418 which indicates a datasource selected to be associated with dynamic document template 104.

In step 504, static text is enabled to be inserted into the dynamicdocument template. For example, referring to FIG. 4, text editor module408 may be configured to enable a user to insert static text (e.g.,static text 202 of FIG. 2) in dynamic document template 104. Forexample, text editor module 408 may enable the user to input static textinto dynamic document template 104 in various ways, including manuallytyping in static text, inputting static text using speech recognition,and/or by other technique. For instance, in an embodiment, templateeditor 402 may provide a user interface, such as a graphical userinterface (GUI), to enable a user to input static text into dynamicdocument template 104.

In step 506, at least one placeholder is enabled to be inserted in thedynamic document template. For example, referring to FIG. 4, placeholderdesignator module 410 may be configured to enable a user to insert oneor more placeholders (e.g., one or more of placeholder 204 of FIG. 2) indynamic document template 104. For example, placeholder designatormodule 410 may enable the user to insert a placeholder into dynamicdocument template 104 in various ways, including by manually typing inplaceholder label, and indicating the label as a placeholder, such as bysurrounding the text with brackets or other suitable character(s), byusing a pointing device to highlight the text and to cause a menu toappear (e.g., by right clicking on the highlighted text) that has aplaceholder indication that can be applied to the highlighted text,and/or by further technique. For instance, in an embodiment, placeholderdesignator module 410 may provide a user interface, such as a graphicaluser interface (GUI), to enable a user to insert a placeholder intodynamic document template 104.

For instance, the following two lines of text are an example of aportion of text inserted into a dynamic document template 104 that maybe generated by a user using document configurer 400:

-   -   Dear [Customer],    -   The amount due is: [AmountDue]        The text portions “Dear” and “The amount due is:” are two        example portions of static text 202 that may be enabled        (according to step 504) to be inserted into the example dynamic        document template 104. Thus, the text portions “Dear” and “The        amount due is:” are configured to be present in each formatted        document 208 generated from the example dynamic document        template 104. The text portions [Customer] and [AmountDue] are        two example placeholders 204 that may be enabled (according to        step 506) to be inserted into of the example dynamic document        template 104, as indicated by opening and closing brackets. The        text portions [Customer] and [AmountDue] are configured to be        variable (dynamic) in each formatted document 208 generated from        the example dynamic document template 104. With regard to the        first placeholder of “[Customer]”, the text “Customer” is a        label for the placeholder, and the opening and closing brackets        “[” and “]” define the beginning and the end boundaries,        respectively, of the first placeholder.

In step 508, an expression is enabled to be associated with theplaceholder in the dynamic document template, the expression referencinga data element of the data source to be displayed in place of theplaceholder, and being configured to select a display attribute for thedata element. For example, referring to FIG. 4, expression editor module414 may be configured to enable a user to input and associate anexpression with a placeholder (e.g., associating expression 208 withplaceholder 204 in FIG. 2) in dynamic document template 104. Forexample, expression editor module 414 may enable the user to insert anexpression into dynamic document template 104 in various ways, includingmanually typing in the expression (e.g., in equation form), etc.Furthermore, expression editor module 414 may enable the expression tobe associated with a placeholder in various ways. For example, in anembodiment, a user may be enabled to use a pointing device to click on aplaceholder in dynamic document template 104 to cause a menu to appearthat includes an expression editor selection (which, if selected, opensan expression editor window), and/or by further technique. For instance,in an embodiment, expression editor module 414 may provide a userinterface, such as a graphical user interface (GUI), to enable a user toinput an expression into dynamic document template 104, and to associatethe expression with a placeholder.

As shown in FIG. 4, template editor 412 may include display attributemodule 412. Display attribute module 412 may be present to enabledisplay attributes to be applied to static text and/or placeholders indynamic document template 104. Examples of such display attributes thatmay be applied by display attribute module 412 include a font, a color,a bold setting, an italics setting, a font size, a line spacing, and/oran effects setting (e.g., blinking text, animations, etc.). Displayattribute module 412 may enable display attributes to be applied tostatic text and placeholders in various ways. For example, in anembodiment, a user may be enabled to use a pointing device to click onstatic text or a placeholder in dynamic document template 104 to cause amenu to appear that has a static text or placeholderattributes/properties selection (which, if selected, opens acorresponding display attributes window), and/or by further technique.For instance, in an embodiment, display attribute module 412 may providea user interface, such as a graphical user interface (GUI), to enable auser to apply display attributes to static text and/or placeholders indynamic document template 104.

For instance, FIG. 6 shows a block diagram of template editor 402,according to an example embodiment. As shown in FIG. 6, template editor402 may include a graphical user interface (GUI) generator 602 that isconfigured to generate a GUI 604, which may also be referred to as a“dialog,” to enable easy, fluid ways of configuring a template,including declaring dynamic text (placeholders) and expressions. GUIgenerator 602 may be configured to generate GUI 604 (“dialogs”) for anyone or more of text editor module 408, placeholder designator module410, display attribute module 412, and expression editor module 414.

For instance, FIG. 7 shows a flowchart 700 that may be performed withrespect to step 508 of flowchart 500 to use a GUI to associate anexpression with a placeholder in dynamic document template 104,according to an example embodiment. Flowchart 700 is described asfollows.

As shown in FIG. 7, flowchart 700 begins with step 702. In step 702, auser is enabled to interact with the placeholder to invoke a graphicaluser interface. For example, a user may be enabled to use a pointingdevice to click on a placeholder in dynamic document template 104 tocause a graphical user interface (GUI) to appear (which, if selected,opens an expression editor window), and/or by further technique. Forinstance, FIG. 8 shows a GUI window 800, according to an exampleembodiment. GUI window 800 may be invoked (e.g., generated by GUIgenerator 602 in FIG. 6) by interacting with a placeholder in dynamicdocument template 104.

In step 704, at least one static display attribute option is displayedin the graphical user interface that is selectable for association withthe placeholder. For example, GUI window 800 may provide various staticdisplay attributes that may be selected for text (static text orplaceholders) in dynamic document template 104, such that when the textis displayed in formatted document 108, the text has the selecteddisplay attributes. For example, as shown in FIG. 8, GUI window 800includes a font type selector 802, a bold style selector 804, an italicsstyle selector 806, a line spacing selector 808, a font size selector810, a color selector 812, and an effects selector 814. Any one or moreof these selectors and/or alternative display attribute selectors may bepresent in GUI window 800. Furthermore, GUI window 800 includes a sampleregion 816, which shows a sample of the display attributes that arecurrently selected on example text (“AaBbCb”).

Font type selector 802 enables a user to select a font for the selectedtext. As shown in FIG. 8, font type selector 802 may be a list ofselectable fonts, but may alternatively have other graphical interfaceform. Bold style selector 804 enables a user to select whether theselected text is bolded. As shown in FIG. 8, bold style selector 804 maybe a check box, but may alternatively have other graphical interfaceform. Italics style selector 806 enables a user to select whetherselected text is italicized. As shown in FIG. 8, italics style selector806 may be a check box, but may alternatively have other graphicalinterface form. Line spacing selector 808 enables a user to select aline spacing for the selected text. As shown in FIG. 8, line spacingselector 808 may be a radio button (with a custom selection entry box),but may alternatively have other graphical interface form. Font sizeselector 810 enables a user to select a font size for the selected text.As shown in FIG. 8, font size selector 810 may be a list of selectablefont sizes, but may alternatively have other graphical interface form.Color selector 812 enables a user to select a color for the selectedtext. As shown in FIG. 8, color selector 812 may be a drop down menu ofselectable colors, but may alternatively have other graphical interfaceform. Effects selector 814 enables a user to select a type of effectsfor the selected text. As shown in FIG. 8, effects selector 814 may be adrop down menu of selectable effects, but may alternatively have othergraphical interface form.

In step 706, the user is enabled to interact with the graphical userinterface to invoke an expression entry box in which the expression maybe entered. In embodiments, the GUI window invoked in step 702 mayprovide various ways for enabling a user to invoke an expression entrybox into which an expression associated with the placeholder may beentered. For example, as shown in FIG. 8, GUI window 800 includes aplurality of expression entry buttons 822 a-822 g, with each expressionentry button 822 corresponding to one of font type selector 802, boldstyle selector 804, italics style selector 806, line spacing selector808, font size selector 810, color selector 812, and effects selector814. Each of expression entry buttons 822 a-822 g may be selected toenable an expression to be entered with respect to the corresponding oneof font type selector 802, bold style selector 804, italics styleselector 806, line spacing selector 808, font size selector 810, colorselector 812, and effects selector 814.

For example, if expression entry button 822 a is selected, an expressionmay be provided (textually, graphically, etc.) by the user that isconfigured to select a font type for the placeholder indicated in step702. If expression entry button 822 b is selected, an expression may beprovided by the user that is configured to select a bold style for theplaceholder indicated in step 702. If expression entry button 822 c isselected, an expression may be provided by the user that is configuredto select an italics style for the placeholder indicated in step 702. Ifexpression entry button 822 d is selected, an expression may be providedby the user that is configured to select line spacing for theplaceholder indicated in step 702. If expression entry button 822 e isselected, an expression may be provided by the user that is configuredto select a font size for the placeholder indicated in step 702. Ifexpression entry button 822 f is selected, an expression may be providedby the user that is configured to select a color for the placeholderindicated in step 702. If expression entry button 822 g is selected, anexpression may be provided by the user that is configured to select aneffects style for the placeholder indicated in step 702.

FIG. 9 shows an example expression entry window 900 that may be invokedby selecting an expression entry button 822, according to an embodiment.As shown in FIG. 9, window 900 includes an expression entry box 902, aconfirm button 904, and a cancel button 906. In the example of FIG. 9, auser may enter an expression (e.g., expression 206 or 208 of FIG. 2)into expression entry box 902. An expression entered into expressionentry box 902 may be configured such that when the expression isevaluated, a display attribute is selected for the text that isdisplayed in place of the placeholder indicated in step 702. Theexpression is configured to select a display attribute associated withthe particular expression entry button 822 that is selected. Forexample, referring to FIG. 8, if expression entry button 822 c isselected, which corresponds to italics style selector 806, the resultingexpression entry window 900 that is invoked enables a user to enter anexpression into expression entry box 902 that is configured to select anitalics style (e.g., italics on or off). If expression entry button 822e is selected, which corresponds to font size selector 810, theresulting expression entry window 900 that is invoked enables a user toenter an expression into expression entry box 902 that is configured toselect a font size (e.g., 10 pt font, 11 pt font, etc.).

After entering an expression into expression entry box 902, the user mayselect confirm button 904 (“Ok”) to enter the expression into dynamicdocument template 104 in association with the placeholder.Alternatively, the user may select cancel button 906 to not enter theexpression in dynamic document template 104. Furthermore, when the useris finished configuring display attributes in GUI window 800, the usermay select a confirm button 818 (“Ok”) or a cancel button 820.

An expression may be entered into expression entry box 902 in any form,including any combination of textual, Boolean, logical, and/orarithmetic operation. For example, the expression may be entered in aprogramming language form, including in the form of JavaScript, VisualBasic, C#, further Microsoft® .NET supported languages, etc.Furthermore, the expression may include any number of data elements asvariables, the values of which may be retrieved from a data sourceexternal to dynamic document template 104.

For instance, with respect to the example “[AmountDue]” placeholdershown above, the following example expression (shown in Visual Basicform, for purposes of illustration) may be entered into expression entrybox 902 for an expression entry window 900 invoked by selectingexpression entry button 822 f (corresponding to color selector 812):

-   -   =IIF(Fields!AmountDue.Value>=500, “Red”, “Green”)        With respect to this example expression, the        “Fields!AmountDue.Value” parameter is a dynamic component,        indicating that a value for “AmountDue.Value” is retrieved from        an external data source (e.g., a database) associated with        dynamic document template 104 as described above. When        generating a formatted document that includes this expression, a        value for “AmountDue.Value” is retrieved, and if the retrieved        value is greater than or equal to 500, the color “Red” is        selected. If the retrieved value is less than 500, the color        “Green” is selected. The selected color is applied to the        retrieved value, which is displayed in place of the placeholder        “[AmountDue]” in the formatted document.

The expression shown above is provided for purposes of illustration, andas described above, any form of expression may be provided to select anydisplay attribute for a placeholder.

Expressions may also be associated with a placeholder to determine adata value to be displayed in place of the placeholder in a formatteddocument. For example, in an embodiment, flowchart 500 of FIG. 5 mayinclude a step 1002 shown in FIG. 10 (in addition to, or alternativelyto step 508). In step 1002, a second expression is enabled to beassociated with a second placeholder inserted in the dynamic documenttemplate, the second expression referencing a second data element of thedata source, and being configured to determine a data value to bedisplayed in place of the second placeholder based on the second dataelement. For example, in a similar manner as described above withrespect to FIG. 4 and step 508 of flowchart 500, expression editormodule 414 may be configured to enable a user to input and associate anexpression with a placeholder in dynamic document template 104 that isconfigured to determine a data value to be displayed in place of theplaceholder in a formatted document.

For example, expression entry window 900 (FIG. 9) may be invoked byselecting an expression entry button 822 (FIG. 8) in window 800 for aparticular placeholder in dynamic document template 104. An expressionmay be entered by a user in expression entry box 902 that is configuredto determine a data value to be displayed in place of the placeholder.An example of such an expression is shown below, which may be associatedwith the [AmountDue] placeholder shown above:

-   -   =(Fields!AmountDue.Value−100)        With respect to this example expression, the        “Fields!AmountDue.Value” parameter is a data element providing a        dynamic component to the expression, indicating that a value for        “AmountDue.Value” is retrieved from an external data source        (e.g., a database), which is associated with dynamic document        template 104 by data source selector 406 (FIG. 4), as described        above. When generating a formatted document that includes this        expression, a value for “AmountDue.Value” is retrieved. The        amount “100” is subtracted from the value for “AmountDue.Value”,        and the resulting amount is displayed in place of the        [AmountDue] placeholder in the formatted document. In this        manner, the expression is configured to determine a data value        to be displayed by performing an operation that includes the        “AmountDue.Value” as a variable parameter. Although shown above        as including a subtraction arithmetic operation, the expression        may have any in any form, including any combination of textual,        Boolean, logical, and/or arithmetic operation.

Expressions may also be associated with static text to select displayattributes for static text displayed in a formatted document, such as isshown in FIG. 2, where expression 206 is associated with static text202. For example, in an embodiment, flowchart 500 of FIG. 5 may includea step 1102 shown in FIG. 11 (in addition to, or alternatively to steps508 and/or 1002). In step 1102, a second expression is enabled to beassociated with a portion of the static text, the second expressionreferencing a second data element of the data source, and beingconfigured to select a second display attribute for the portion ofstatic text based at least on the second data element. For example, in asimilar manner as described above with respect to FIG. 4 and step 508 offlowchart 500, expression editor module 414 may be configured to enablea user to input and associate an expression with a static text indynamic document template 104 that is configured to determine a displayattribute for the static text to be displayed in a formatted document.

For example, static text in dynamic document template 104 may beselected by a user (e.g., highlighted using a shift-cursor operation orpointing device), to cause a menu to appear that has a static textattributes/properties selection. By selecting the static textattributes/properties selection, a GUI, such as GUI window 800 (FIG. 8)may be displayed for the selected static text, to enable displayattributes to be selected for the selected static text. A displayattribute expression entry window 900 (FIG. 9) may be invoked byselecting an expression entry button 822 (FIG. 8) in window 800. Anexpression may be entered by a user in expression entry box 902 that isconfigured to determine a display attribute for the selected statictext. An example of such an expression is shown below, which may beassociated with the “The amount due is:” static text shown above:

-   -   =IIF(Fields!AmountDue.Value>=500, “Red”, “Green”)        With respect to this example expression, the        “Fields!AmountDue.Value” parameter is a data element providing a        dynamic component to the expression, indicating that a value for        “AmountDue.Value” is retrieved from an external data source,        which is associated with dynamic document template 104 as        described above. When generating a formatted document that        includes this expression, a value for “AmountDue.Value” is        retrieved, and if the retrieved value is greater than or equal        to 500, the color “Red” is selected. If the retrieved value is        less than 500, the color “Green” is selected. The selected color        is applied to the selected static text “The amount due is:” when        displayed the formatted document. In this manner, an expression        may be configured to determine a display attribute for static        text based on one or more data elements as variable parameters.

A single data element is described as included in the exampleexpressions provided above. In further embodiments, multiple dataelements may be included in an expression associated with a placeholderor with static text. An example of such an expression is shown below,which may be associated with the [Customer] placeholder shown above:

-   -   =Fields!FirstName.Value+Fields!LastName.Value        With respect to this example expression, the        “Fields!FirstName.Value” and “Fields!LastName.Value” parameters        are data elements providing dynamic components to the        expression. When generating a formatted document that includes        this expression, values for “FirstName.Value” and        “LastName.Value” are retrieved from an external data source. The        retrieved values are concatenated together according to the        expression, and displayed in place of the [Customer] placeholder        in the formatted document (e.g., to provide first and second        names of a customer). Although two data elements are illustrated        in this example, in a similar manner, third, fourth, and further        numbers of data elements may be included in expressions to        determine data values and/or to select display attributes.

As shown in FIG. 4, template editor 402 generates dynamic documenttemplate 104. Template editor 402 may be configured to generate dynamicdocument template 104 in any suitable form. For example, dynamicdocument template 104 may be generated as one or more files or otherdata structures that include data source indication 418, static text202, one or more placeholders 204, one or more of expressions 206 and/orexpressions 208. For instance, dynamic document template 104 may begenerated in a conventional word processing document format, accordingto a programming code or specification, or in other form. One example ofa portion of the contents of a dynamic document 104 is shown as follows,in XML (extensible markup language) form:

<Paragraph>  <TextRuns>   <TextRun>    <Value>Dear </Value>    <Style />   </TextRun>    <TextRun>     <Value>Fields! Customer.Value</Value>    <Style />    </TextRun>    <TextRun>     <Value>, </Value>    <Style />    </TextRun>   </TextRuns>   <Style /> </Paragraph><Paragraph>   <TextRuns>    <TextRun>     <Value>The amount due is:</Value>     <Style />    </TextRun>    <TextRun>     <Value>Fields!AmountDue.Value</Value>     <Style>      <Format>’$0.00;(‘$’0.00)</Format>      <Color>=IIF(Fields!AmountDue.Value &gt;= 500,“Red”, “Green”),/Color>     <Style />    </TextRun>   </TextRuns>  <Style /> </Paragraph>A declarative language, such as XML, which may be format independent,provides an efficient structure for defining the contents of dynamicdocument template 104. For instance, XML may provide a structure forexpressing blocks of paragraphs and flows of text, as shown above, whichcan each include static and dynamic pieces.

In the above example XML code, the element pair “<Paragraph>” and“</Paragraph>” (a “Paragraph pair”) delineates the boundaries of aparagraph generated from dynamic document template 104. Thus, twoparagraphs of text are provided by this example XML code. The elementpair “<TextRuns>” and “</TextRuns>” (a “TextRuns” pair) delineates theboundaries of a contiguous series of strings of similarly formatted textgenerated from dynamic document template 104 (within a paragraph). Eachstring of text is delineated by the element pair “<TextRun>” and“</TextRun>” (a “TextRun pair”). Each TextRuns pair may be evaluatedindividually, and rendering clients can achieve rich text output simplyby concatenating the values of all TextRuns.

The element pair “<Value>” and “</Value>” (a “Value pair”) delineatesthe boundaries of a string of static text and/or a placeholder generatedfrom dynamic document template 104. For instance, in the exampledescribed further above, the text “The amount due is:” is static text,and is shown in the XML code above contained within a Value pair. Theelement pair “<Style>” and “</Style>” (a “Style pair”) contained in aTextRun pair delineates the boundaries of a particular display style(e.g., display attribute) setting for text contained within the Stylepair. A default display style for a TextRun pair may be indicated byincluding “<Style/>” within the TextRun pair. The element pair“<Format>” and “</Format>” (a “Format pair”) delineates the boundariesof a display format for a placeholder generated from dynamic documenttemplate 104.

For example, a Value pair in the above XML code (that is containedwithin a TestRun pair) contains “Fields!AmountDue.Value”, whichindicates a data element is to be retrieved for the [Amount Due]placeholder. A Format pair in the above XML code in the same TestRunpair contains the text “‘$0.00; (‘$’0.00)”, which indicates that theretrieved data element is to be displayed for the [AmountDue]placeholder in dollar format in a generated formatted document.

The element pair “<Color>” and “</Color>” (a “Color pair”) delineatesthe boundaries of expression used to select a color for static text or aplaceholder generated from dynamic document template 104. For example, aColor pair in the above XML code includes the following expression“IIF(Fields!AmountDue.Value &gt;=500, “Red”, “Green”)” (where “&gt; isequivalent to “>”), which was described above. This expression may beevaluated based on the value of the retrieved data element to select acolor (e.g., red or green) for the data element displayed for the[AmountDue] placeholder.

The example element pairs shown and described above with respect to theexample XML code are provided for illustrative purposes, and are notintended to be limiting. Persons skilled in the relevant art(s) willunderstand that alternative names may be used for the element pairs, andthat additional types of element pairs may be present, such asadditional element pairs used to delineate the boundaries of displayattributes. Examples of such additional element pairs include a<FontType> </FontType> pair (providing a font type for contained statictext/placeholders), a <BoldStyle> </BoldStyle> pair (providing a boldstyle for contained static text/placeholders), a <ItalicsStyle></ItalicsStyle> pair (providing an italics style for contained statictext/placeholders), a <LineSpacing> </LineSpacing> pair (providing aline spacing for contained static text/placeholders), a <FontSize></FontSize> pair (providing a font size for contained statictext/placeholders), an <Effects> </Effects> pair (providing an effectstype for contained static text/placeholders), etc.

B. Example Embodiments for Configuring a Dynamic Document

Example embodiments are described in this subsection for documentgenerator 106 and for generating formatted documents. The exampleembodiments described herein are provided for illustrative purposes, andare not limiting. Furthermore, additional structural and operationalembodiments, including modifications/alterations, will become apparentto persons skilled in the relevant art(s) from the teachings herein.

As described above, document generator 106 (FIG. 1) is configured togenerate formatted documents 108 based on dynamic document template 104.For instance, in an embodiment, document generator 106 may performflowchart 1200 shown in FIG. 12. As shown in FIG. 12, flowchart 1200begins with step 1202. In step 1202, a dynamic document template isreceived. For example, as shown in FIG. 1, document generator 106receives dynamic document template 104.

In step 1204, a formatted document is generated based on the dynamicdocument template. For example, as shown in FIG. 1, document generator106 generates formatted documents 108 a-108 c. Any number of formatteddocuments 108 may be generated.

In step 1206, the formatted document is displayed, printed, and/orstored. For example, as shown in FIG. 3, document generator 106 storesformatted document 108 in storage 304. Additionally, or alternatively,formatted documents 108 may be printed, may be displayed, may betransmitted (e.g., emailed), or otherwise utilized.

Document generator 106 may be configured in various ways to generate oneor more formatted documents 108 based on dynamic document template 104.For instance, FIG. 13 shows a block diagram of a document generator1300, according to an example embodiment. Document generator 1300 is anexample of document generator 106 shown in FIGS. 1 and 3. As shown inFIG. 13, document generator 1300 includes a template loader 1308 anddocument formatter 1306. Document generator 1300 is further showncoupled to a display 1302, to storage 304, and to a data source 1304.Document generator 1300 is described as follows.

Template loader 1308, when present, is configured to load dynamicdocument template 104 into document generator 1300. For example,template loader 1308 may provide a navigator interface that enables auser to enter a file name for dynamic document template 104 (e.g., asstored in storage 304 in FIG. 3), and/or to navigate to a location atwhich dynamic document template 104 is stored, and to select dynamicdocument template 104 at the location, to be loaded into documentgenerator 1300. Template loader 1308 is further configured to providedynamic document template 104 to document formatter 1306 to generate oneor more formatted documents 108.

Document formatter 1306 is configured to generate formatted documents108 based on dynamic document template 104 and one or more data elementsloaded from data source 1304. As shown in FIG. 13, document formatter1306 includes a static text recognizer 1312, a placeholder recognizer1314, an expression evaluator 1316, and a text formatter 1318. Statictext recognizer 1312 is configured to detect static text (e.g., statictext 202 of FIG. 2) in dynamic document template 104, which is includedby document formatter 1306 in formatted document 108. Placeholderrecognizer 1314 is configured to detect one or more placeholders (e.g.,placeholder 204 of FIG. 2) in dynamic document template 104. Expressionevaluator 1316 is configured to evaluate expressions (e.g., expressions206 and 208 in FIG. 2) associated with static text and placeholders indynamic document template 104. As shown in FIG. 13, when expressionevaluator 1316 determines that an expression references a data element,document formatter 1306 is configured to transmit a data request to datasource 1304 to retrieve the data element. In response, data source 1304transmits a data element 1322, which is received by expression evaluator1316 in document formatter 1306. In embodiments, expression evaluator1316 may evaluate an expression that includes retrieved data element1322. For example, the expression may be evaluated to select a displayattribute for static text or for data inserted in place of aplaceholder. Additionally, or alternatively, the expression may beevaluated to determine a data value to be inserted in place of aplaceholder. Text formatter 1318 is configured to format the text(static text or data element) in formatted document 108 according to theselected display attribute and/or to provide the determined data valueto be inserted in place of a placeholder.

Document generator 1300 may operate in various ways. For example, FIG.14 shows a flowchart 1400 describing a process for generating documents,according to an example embodiment. For instance, document generators106 and 1300 may perform flowchart 1400, in embodiments. Otherstructural and operational embodiments will be apparent to personsskilled in the relevant art(s) based on the discussion regardingflowchart 1400. The steps of flowchart 1400 do not need to be performedin the order shown. Flowchart 1400 is described as follows.

As shown in FIG. 14, flowchart 1400 begins with step 1402. In step 1402,static text is detected in the dynamic document template. For example,as described above, static text recognizer 1312 may be configured todetect static text in dynamic document template 104. Static textrecognizer 1312 may be configured to parse dynamic document template 104to detect static text. For instance, referring to the XML code examplefor dynamic document template 104 shown in the prior subsection, statictext recognizer 1312 may be configured to parse dynamic documenttemplate 104 for Value pairs (<Value> and </Value>) that contain statictext (e.g., “Dear” and “The amount due is:” in the XML code shownabove). Static text recognizer 1312 may be configured in any manner todetect static text in dynamic document template 104, according to theparticular format used for static text.

In step 1404, one or more placeholders are detected in the dynamicdocument template. For example, as described above, placeholderrecognizer 1314 may be configured to detect placeholders in dynamicdocument template 104. Placeholder recognizer 1314 may be configured toparse dynamic document template 104 to detect placeholders. Forinstance, referring to the XML code example for dynamic documenttemplate 104 shown in the prior subsection, placeholder recognizer 1314may be configured to parse dynamic document template 104 for Value pairs(<Value> and </Value>) that contain a placeholder in the form of a“Fields!” code followed by a data element label, such as“Fields!Customer.Value”, where “Customer.Value” is a data elementcorresponding to a [CustomerValue] placeholder. Placeholder recognizer1314 may be configured in any manner to detect placeholders in dynamicdocument template 104, according to the particular format used forstatic text.

In step 1406, the detected static text is included in the formatteddocument. For example, referring to FIG. 13, text formatter 1318 may beconfigured to include static text detected by static text recognizer1312 in formatted document 108. For example, FIG. 15 shows a portion ofa formatted document 1500, which is an example of formatted document108, according to an embodiment. Formatted document 1500 may begenerated by document generator 1300 shown in FIG. 13 from the exampleXML code shown in the prior subsection, for instance. As shown in FIG.15, formatted document 1500 includes static text 1502 (“Dear”), statictext 1506 (“,”), and static text 1508 (“The amount due is:”), which wereeach defined in the above example XML code in corresponding Value pairs.

In step 1408, a data element referenced by an expression associated witha detected placeholder in the dynamic document template is retrievedfrom a data source associated with the dynamic document template. Forexample, referring to FIG. 13, expression evaluator 1306 may beconfigured to detect a data element referenced by an expressionassociated with a placeholder detected by placeholder recognizer 1314.Document formatter 1306 may be configured to retrieve the detected dataelement from data source 1304 (e.g., by transmitting a data request) asdata element 1322.

Data source 1304 may be any source of data, including a database, a webservice, or another source of data external to dynamic document template104. In one embodiment, data source 1304 may be a database that containsa plurality of records, with each record corresponding to a particularversion of formatted document 108 generated by document generator 1300.For instance, FIG. 16 shows a block diagram of a data source 1304containing a database 1602, according to an example embodiment. As shownin the example of FIG. 16, database 1602 includes a plurality of records1604 (e.g., a first record 1604 a and a second record 1604 b).Furthermore, each record 1604 includes a plurality of fields or dataelements 1606. For instance, first record 1604 a includes a first dataelement 1606 aa, a second data element 1606 ab, and may include furtherdata elements 1606. Second record 1604 b includes a first data element1606 ba, a second data element 1606 bb, and may include further dataelements 1606.

Dynamic document template 104 may include a plurality of placeholders204 that each utilize one or more expressions, with each expressioncorresponding to one or more data elements 1606 included in a record1604 of database 1602. In one example, each time document generator 1300generates a formatted document 108 based on such a dynamic documenttemplate 104, a corresponding record 1604 of database 1602 may supplydata elements 1606 to be used in expressions referenced by the template.For instance, record 1604 a may supply data elements 1606 to generateformatted document 108 a, record 1604 b may supply data elements 1606 togenerate formatted document 108 b, etc.

In step 1410, the expression is evaluated to select a display attribute.For example, referring to FIG. 13, expression evaluator 1306 may beconfigured to evaluate the expression of step 1408 according to dataelement 1322 retrieved in step 1408. Note that steps 1408 and 1410 maybe repeated for additional expressions associated with placeholders intemplate 104.

For instance, referring to the example XML code shown in the priorsubsection, a data element 1322 value of “500” may be retrieved fromdata source 1304 with regard to the AmountDue.Value parameter associatedwith the [AmountDue] placeholder. In this example, expression evaluator1306 evaluates the expression IIF(Fields!AmountDue.Value>=500, “Red”,“Green”) for AmountDue.Value=500. Because the retrieved value of 500(AmountDue.Value) is equal to 500, expression evaluator 1306 selects“Red” as the color display attribute.

In step 1412, the data element is included in the formatted document inplace of the placeholder configured for display according to theselected display attribute. For example, referring to FIG. 13, textformatter 1318 may include the data element retrieved in step 1408 informatted document 108 in place of the placeholder. Furthermore, textformatter 1318 formats the data element in formatted document 108according to the selected display attribute.

For instance, in the current example with regard to the XML code shownin the prior subsection, a data element 1322 value of “500” may beretrieved in step 1408, and the color display attribute of “Red” may beselected in step 1410. As such, the value 500 may be displayed informatted document 1500 in FIG. 15 as placeholder replacement text 1510(for the [AmountDue] placeholder) in the color red.

Note that steps 1408, 1410, and 1412 may be varied to accommodatedetermining data values to be displayed in place of a placeholder, anddetermining a display attribute to be applied to static text in aformatted document. For instance, FIG. 17 shows a flowchart 1700providing a process for determining data values to be displayed in placeof a placeholder, according to an example embodiment. Flowchart 1700 maybe performed in addition to flowchart 1400, or in place of steps 1408,1410, and 1412. Furthermore, flowchart 1700 may be repeated for anynumber of expressions associated with placeholders in template 104.Flowchart 1700 is described as follows.

As shown in FIG. 17, flowchart 1700 starts at step 1702. In step 1702, asecond data element referenced by a second expression associated with adetected second placeholder in the dynamic document template isretrieved. Similarly to step 1408 described above, expression evaluator1306 (FIG. 13) may be configured to detect a data element referenced byan expression associated with a placeholder detected by placeholderrecognizer 1314. Document formatter 1306 may be configured to retrievethe detected data element from data source 1304 as data element 1322.

In step 1704, the second expression is evaluated to determine a datavalue. For example, referring to FIG. 13, expression evaluator 1306 maybe configured to evaluate the expression according to data element 1322retrieved in step 1702. As described above in the prior subsection, theexpression may be any logical, Boolean, and/or arithmetic operation thatincludes the retrieved data element 1322.

For instance, the expression may be “Fields!AmountDue.Value−100” for the[AmountDue] placeholder. If the data element retrieved in step 1702 for“AmountDue.Value” has a value of 500, the expression may be evaluated byexpression evaluator 1306 as 500−100=400.

In step 1706, the data value is included in the formatted document inplace of the detected second placeholder. For example, referring to FIG.13, text formatter 1318 may include the data value determined in step1704 in formatted document 108 in place of the placeholder.

For instance, in the current example, the data value of 400 determinedin step 1704 may be included in a formatted document 108 as placeholderreplacement text for the [AmountDue] placeholder.

In another example, FIG. 18 shows a flowchart 1800 providing a processfor determining a display attribute to be applied to static text in aformatted document, according to an example embodiment. Flowchart 1800may be performed in addition to flowchart 1400, or in place of steps1408, 1410, and 1412. Furthermore, flowchart 1800 may be repeated forany number of expressions associated with static text in template 104.Flowchart 1800 is described as follows.

As shown in FIG. 18, flowchart 1800 starts at step 1802. In step 1802, asecond data element referenced by a second expression associated with aportion of the static text in the dynamic document template isretrieved. Similarly to step 1408 described above, expression evaluator1306 (FIG. 13) may be configured to detect a data element referenced byan expression associated with static text detected by static textrecognizer 1312. Document formatter 1306 may be configured to retrievethe detected data element from data source 1304 as data element 1322.

In step 1804, the second expression is evaluated to determine a seconddisplay attribute. For example, referring to FIG. 13, expressionevaluator 1306 may be configured to evaluate the expression according todata element 1322 retrieved in step 1802.

For instance, the expression IIF(Fields!AmountDue.Value>=500, “Red”,“Green”) may be associated with the static text “The amount due is:” inthe example XML code shown in the prior subsection. A data element 1322value of “250” may be retrieved from data source 1304 with regard to theAmountDue.Value parameter in the expression. In this example, expressionevaluator 1306 evaluates the expression IIF(Fields!AmountDue.Value>=500,“Red”, “Green”) for AmountDue.Value=250. Because 250 (AmountDue.Value)is less than 500, expression evaluator 1306 selects “Green” as the colordisplay attribute.

In step 1806, the portion of static text is configured to be displayedaccording to the second display attribute. For example, referring toFIG. 13, text formatter 1318 may include the static text in formatteddocument 108. Furthermore, text formatter 1318 formats the static textin formatted document 108 according to the display attribute selected instep 1806.

For instance, in the current example, a data element 1322 value of “250”may be retrieved in step 1802, and the color display attribute of“Green” may be selected in step 1804. As such, the static text “Theamount due is:” may be displayed in a formatted document 108 as statictext in the color green (not indicated in FIG. 15).

As shown in FIG. 13, document formatter 1306 generates one or moreformatted documents 108, which may be displayed by display 1302, may bestored in storage 304, may be printed, and/or may be otherwise utilized.

III. Further Example Embodiments

Template editor 402, template loader 404, data source selector 406, texteditor module 408, placeholder designator module 410, expression editormodule 414, GUI generator 602, document formatter 1306, template loader1308, static text recognizer 1312, placeholder recognizer 1314,expression evaluator 1316, and text formatter 1318 may be implemented inhardware, software, firmware, or any combination thereof. For example,template editor 402, template loader 404, data source selector 406, texteditor module 408, placeholder designator module 410, expression editormodule 414, GUI generator 602, document formatter 1306, template loader1308, static text recognizer 1312, placeholder recognizer 1314,expression evaluator 1316, and/or text formatter 1318 may be implementedas computer program code configured to be executed in one or moreprocessors. Alternatively, template editor 402, template loader 404,data source selector 406, text editor module 408, placeholder designatormodule 410, expression editor module 414, GUI generator 602, documentformatter 1306, template loader 1308, static text recognizer 1312,placeholder recognizer 1314, expression evaluator 1316, and/or textformatter 1318 may be implemented as hardware logic/electricalcircuitry.

FIG. 19 depicts an exemplary implementation of a computer 1900 in whichembodiments of the present invention may be implemented. For instance,first and second computer systems 302 and 306 (FIG. 3) may beimplemented similarly to computer 1900, and may include one or morefeatures of computer 1900 and/or alternative features. Computer 1900 maybe a general-purpose computing device in the form of a conventionalpersonal computer, a mobile computer, or a workstation, for example, orcomputer 1900 may be a special purpose computing device. The descriptionof computer 1900 provided herein is provided for purposes ofillustration, and is not intended to be limiting. Embodiments of thepresent invention may be implemented in further types of computersystems, as would be known to persons skilled in the relevant art(s).

As shown in FIG. 19, computer 1900 includes a processing unit 1902, asystem memory 1904, and a bus 1906 that couples various systemcomponents including system memory 1904 to processing unit 1902. Bus1906 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. System memory 1904 includes read onlymemory (ROM) 1908 and random access memory (RAM) 1910. A basicinput/output system 1912 (BIOS) is stored in ROM 1908.

Computer 1900 also has one or more of the following drives: a hard diskdrive 1914 for reading from and writing to a hard disk, a magnetic diskdrive 1916 for reading from or writing to a removable magnetic disk1918, and an optical disk drive 1920 for reading from or writing to aremovable optical disk 1922 such as a CD ROM, DVD ROM, or other opticalmedia. Hard disk drive 1914, magnetic disk drive 1916, and optical diskdrive 1920 are connected to bus 1906 by a hard disk drive interface1924, a magnetic disk drive interface 1926, and an optical driveinterface 1928, respectively. The drives and their associatedcomputer-readable media provide nonvolatile storage of computer-readableinstructions, data structures, program modules and other data for thecomputer. Although a hard disk, a removable magnetic disk and aremovable optical disk are described, other types of computer-readablemedia can be used to store data, such as flash memory cards, digitalvideo disks, random access memories (RAMs), read only memories (ROM),and the like.

A number of program modules may be stored on the hard disk, magneticdisk, optical disk, ROM, or RAM. These programs include an operatingsystem 1930, one or more application programs 1932, other programmodules 1934, and program data 1936. Application programs 1932 orprogram modules 1934 may include, for example, computer program logicfor implementing template editor 402, template loader 404, data sourceselector 406, text editor module 408, placeholder designator module 410,expression editor module 414, GUI generator 602, document formatter1306, template loader 1308, static text recognizer 1312, placeholderrecognizer 1314, expression evaluator 1316, text formatter 1318,flowchart 500, flowchart 700, step 1002, step 1102, flowchart 1200,flowchart 1400, flowchart 1700, and/or flowchart 1800 (including anystep of flowcharts 500, 700, 1200, 1400, 1700, and/or 1800), and/or anyfurther embodiments as described above.

A user may enter commands and information into the computer 1900 throughinput devices such as keyboard 1938 and pointing device 1940. Otherinput devices (not shown) may include a microphone, joystick, game pad,satellite dish, scanner, or the like. These and other input devices areoften connected to the processing unit 1902 through a serial portinterface 1942 that is coupled to bus 1906, but may be connected byother interfaces, such as a parallel port, game port, or a universalserial bus (USB).

A monitor 1944 or other type of display device is also connected to bus1906 via an interface, such as a video adapter 1946. In addition to themonitor, computer 1900 may include other peripheral output devices (notshown) such as speakers and printers.

Computer 1900 is connected to a network 1948 (e.g., the Internet)through a network adaptor or interface 1950, a modem 1952, or othermeans for establishing communications over the network. Modem 1952,which may be internal or external, is connected to bus 1906 via serialport interface 1942.

As used herein, the terms “computer program medium” and“computer-readable medium” are used to generally refer to media such asthe hard disk associated with hard disk drive 1914, removable magneticdisk 1918, removable optical disk 1922, as well as other media such asflash memory cards, digital video disks, random access memories (RAMs),read only memories (ROM), and the like.

As noted above, computer programs and modules (including applicationprograms 1932 and other program modules 1934) may be stored on the harddisk, magnetic disk, optical disk, ROM, or RAM. Such computer programsmay also be received via network interface 1950 or serial port interface1942. Such computer programs, when executed or loaded by an application,enable computer 1900 to implement features of embodiments of the presentinvention discussed herein. Accordingly, such computer programsrepresent controllers of the computer 1900.

The invention is also directed to computer program products comprisingsoftware stored on any computer useable medium. Such software, whenexecuted in one or more data processing devices, causes a dataprocessing device(s) to operate as described herein. Embodiments of thepresent invention employ any computer-useable or computer-readablemedium, known now or in the future. Examples of computer-readablemediums include, but are not limited to storage devices such as RAM,hard drives, floppy disks, CD ROMs, DVD ROMs, zip disks, tapes, magneticstorage devices, optical storage devices, MEMs, nanotechnology-basedstorage devices, and the like.

IV. Conclusion

While various embodiments of the present invention have been describedabove, it should be understood that they have been presented by way ofexample only, and not limitation. It will be understood by those skilledin the relevant art(s) that various changes in form and details may bemade therein without departing from the spirit and scope of theinvention as defined in the appended claims. Accordingly, the breadthand scope of the present invention should not be limited by any of theabove-described exemplary embodiments, but should be defined only inaccordance with the following claims and their equivalents.

What is claimed is:
 1. A method for configuring a dynamic document,comprising: enabling a data source to be associated with a dynamicdocument template; enabling static text to be inserted into the dynamicdocument template; enabling at least one placeholder to be inserted inthe dynamic document template; and enabling an expression to beassociated with a placeholder inserted in the dynamic document template,the expression referencing a data element of the data source, and beingconfigured to determine a data value to be displayed in place of theplaceholder based at least on the data element.
 2. The method of claim1, further comprising: enabling a second expression to be associatedwith the placeholder, the second expression referencing a second dataelement of the data source, and being configured to select a displayattribute for the data value.
 3. The method of claim 1, furthercomprising: enabling a second expression to be associated with a portionof the static text, the second expression referencing a second dataelement of the data source, and being configured to select a displayattribute for the portion of static text based at least on the seconddata element.
 4. The method of claim 1, wherein the display attributeincludes at least one of a font, a color, a bold setting, an italicssetting, a font size, a line spacing, or an effects setting.
 5. Themethod of claim 1, wherein said enabling an expression to be associatedwith a placeholder inserted in the dynamic document template comprises:enabling a user to interact with the placeholder to invoke a graphicaluser interface; displaying at least one static display attribute optionin the graphical user interface that is selectable for association withthe first placeholder; and enabling the user to interact with thegraphical user interface to invoke an expression entry box in which theexpression may be entered.
 6. The method of claim 1, further comprising:generating the dynamic document template in extensible markup language(XML) form.
 7. A method for generating a formatted document, comprising:receiving a dynamic document template; and generating a formatteddocument based on the dynamic document template, said generatingcomprising: detecting static text in the dynamic document template,detecting one or more placeholders in the dynamic document template,including the detected static text in the formatted document, retrievingfrom a data source associated with the dynamic document template atleast one data element referenced by an expression associated with aportion of the detected static text in the dynamic document template,evaluating the expression to select a display attribute, and configuringthe portion of the detected static text for display according to theselected display attribute.
 8. The method of claim 7, wherein saidgenerating further comprises: retrieving a second data elementreferenced by a second expression associated with a detected placeholderin the dynamic document template; evaluating the second expression todetermine a data value; and including the data value in the formatteddocument in place of the detected placeholder.
 9. The method of claim 7,wherein said generating further comprises: retrieving a second dataelement referenced by a second expression associated with a detectedplaceholder in the dynamic document template; evaluating the secondexpression to select a second display attribute; and configuring a datavalue to be displayed in place of the detected placeholder to bedisplayed according to the selected second display attribute.
 10. Themethod of claim 7, wherein the display attribute includes at least oneof a font, a color, a bold setting, an italics setting, a font size, aline spacing, or an effects setting.
 11. The method of claim 7, whereinsaid receiving a dynamic document template comprises: receiving thedynamic document template in extensible markup language (XML) form. 12.A document generator, comprising: a document formatter configured toreceive a dynamic document template and to generate a formatteddocument, the document formatter including a static text recognizerconfigured to detect static text in the dynamic document template, aplaceholder recognizer configured to detect one or more placeholders inthe dynamic document template, an expression evaluator, and a textformatter; the document formatter being configured to include the statictext in the formatted document, to retrieve from a data sourceassociated with the dynamic document template at least one data elementreferenced by an expression associated with a detected placeholder inthe dynamic document template; wherein the expression evaluator isconfigured to evaluate the expression to select a display attribute; andwherein the text formatter is configured to include a data value in theformatted document in place of the placeholder configured for displayaccording to the selected display attribute.
 13. The document generatorof claim 12, wherein the document formatter is configured to retrieve asecond data element referenced by a second expression associated with adetected second placeholder in the dynamic document template; theexpression evaluator being configured to evaluate the second expressionto determine a data value; and the text formatter being configured toinclude the data value in the formatted document in place of thedetected second placeholder.
 14. The document generator of claim 12,wherein the document formatter is configured to retrieve a second dataelement referenced by a second expression associated with a portion ofthe detected static text in the dynamic document template; theexpression evaluator being configured to evaluate the second expressionto select a second display attribute; and the text formatter beingconfigured to configure the portion of static text to be displayedaccording to the selected second display attribute.
 15. The documentgenerator of claim 12, wherein the display attribute includes at leastone of a font, a color, a bold setting, an italics setting, a font size,a line spacing, or an effects setting.
 16. The document generator ofclaim 12, the dynamic document template is received in extensible markuplanguage (XML) form.